package com.zq.assistant.func.okhttp;

import android.os.Handler;
import android.os.HandlerThread;
import android.os.Message;

import java.lang.ref.WeakReference;

/**
 * Created by zhangqiang on 17-6-6.
 */

public abstract class SpeedFileTransferListener implements FileTransferListener {

    @Override
    public void onStart(String url, String fileName, String filePath) {

    }

    @Override
    public void onTransfer(long contentLength, long currentLength) {
        SpeedCompute.getInstance().update(this, currentLength);
    }

    @Override
    public void onFinish(String url) {
        SpeedCompute.getInstance().finish(this);
    }

    public abstract void onSpeedChange(long bytesPerSecond);
}
